<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="div1" @click="divHandlerClick">
        <!-- 将事件流改为捕获模式，父元素上添加.capture -->
    <!-- <div id="div1" @click.capture="divHandlerClick"> -->
        <input type="button" value="单击" @click.stop="btnHandlerClick">
    </div>
    <script>
        var vm = new Vue({
            el: "#div1",
            data: {

            },
            methods: {
                divHandlerClick() {
                    alert("div点击事件")
                },
                btnHandlerClick() {
                    alert("按钮点击事件")
                }
            }
        })
    </script>
</body>

</html>